/**
 * Sample React Native App
 * https://github.com/facebook/react-native
 */
'use strict';

var React = require('react-native');
var {
  AppRegistry,
  StyleSheet,
  TabBarIOS,
  Image,
  Text,
  View,
} = React;

var HeroesTab = require('./tabs/heroes');
// var WeaponsTab = require('./tabs/weapons');

var baimaozixun = React.createClass({
  getInitialState: function() {
    return {
      selectedTab: 'heroes',
      presses: 0,
    };
  },
  render: function() {
    return (
      <TabBarIOS >

        <TabBarIOS.Item
        	title="Hero"
          systemIcon="bookmarks"
          selected={this.state.selectedTab === 'heroes'}
          onPress={() => {
            this.setState({
              selectedTab: 'heroes'
            });
          }}>
          <HeroesTab />
        </TabBarIOS.Item>

        <TabBarIOS.Item
          title="Weapon"
          systemIcon="history"
          selected={this.state.selectedTab === 'weapones'}
          onPress={() => {
            this.setState({
              selectedTab: 'weapones'
            });
          }}>
          <View style={[styles.tabContent]}>
            <Text style={styles.tabText}>weapon</Text>
          </View>
        </TabBarIOS.Item>

      </TabBarIOS>
    );
  },

});

var styles = StyleSheet.create({
  tabContent: {
    flex: 1,
    alignItems: 'center',
  },
  tabText: {
    color: 'black',
    margin: 50,
  },
  container: {
    flex: 1,
    flexDirection: 'row',
    justifyContent: 'center',
    alignItems: 'center',
    backgroundColor: '#F5FCFF',
  },
  thumbnail: {
    width: 70,
    height: 70,
  },
});


AppRegistry.registerComponent('baimaozixun', () => baimaozixun);
